#!/usr/bin/env python

import sys, os
from social_class import Social

def get_templates ( liwe ):
	"""
	:INPUT:
		none
	"""
	s = Social ( liwe )
	return { "templates" : s.get_templates () }

def get_objects ( liwe, action_name, ids = '' ):
	"""
	:INPUT:
		- action_name:	SAFE_STRING
		- ids:		SAFE_STRING
	"""
	s = Social ( liwe )

	return { 'list' : s.get_objects ( action_name, ids.split ( '|' ) ) }

def facebook_login ( liwe, access_token ):
	"""
	:INPUT:
		- access_token:	SAFE_STRING
	"""
	s = Social ( liwe )
	return { 'text' : s.facebook_login ( access_token ) }
	
def facebook_post ( liwe, page_id, message ):
	"""
	:INPUT:
		- page_id:		SAFE_STRING
		- message:		SAFE_STRING
	"""
	s = Social ( liwe )
	return s.facebook_post ( page_id, message )

def facebook_get_objects ( liwe, ids = '' ):
	"""
	:INPUT:
		- ids:	SAFE_STRING
	"""
	s = Social ( liwe )
	
	return { 'list' : s.facebook_get_objects ( ids.split ( '|' ) ) }
